CXX=g++
INCLUDE=../src
test-% : test%.cpp
	@$(CXX) -Wall $< -o $@ -I$(INCLUDE)
	@ echo "Test $@ ....."
	@ time ./$@
profile-% : test%.cpp
	@ $(CXX) -pg -Wall $< -o $@ -I$(INCLUDE)
	@ echo "Test $@ ....."
	@ Result=`gprof $@  -p` ; \
	echo "$${Result%%\%         the percentage*}"
	@ Result=`gprof $@  -q` ; \
	echo "$${Result%%-----------------------------------------------*}"
clean : 
	rm test-*
	rm profile-*
	rm gmon.out
.PHONY : clean
